#pragma once

#include <fstream>
#include <map>
#include <memory>

#define BATCH_SIZE (3*1024*1024)

class BufferManager {
    public:
        static BufferManager& getInstance();

		std::unique_ptr<char> GetBufferData(uint32_t vid, uint32_t start, uint32_t& count);

    private:
        BufferManager();
        ~BufferManager();
        BufferManager(const BufferManager&) = delete;
        BufferManager(BufferManager&&) = delete;
        BufferManager& operator=(const BufferManager&) = delete;
        BufferManager& operator=(BufferManager&&) = delete;

        static std::map<uint32_t, std::filebuf> mBuffers;
};
